package com.guan.friend.domain.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.guan.common.core.domain.BaseEntity;
import lombok.Data;
import org.yaml.snakeyaml.events.Event;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @TableName tb_user_exam
 */
@TableName(value ="tb_user_exam")
@Data
public class UserExam extends BaseEntity implements Serializable {
    /**
     * 用户竞赛关系id
     */
    @TableId(value = "USER_EXAM_ID",type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userExamId;

    /**
     * 用户id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 竞赛id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long examId;

    /**
     * 得分
     */
    private Integer score;

    /**
     * 排名
     */
    private Integer examRank;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
